110 PRINT"Enter a search command... Separate Multi-Word commands with AND, OR, or NOT":GOSUB 20100
130 M=0:LOCATE 7,1:PRINT "Command Options:":PRINT "DEFO Define Output Format":PRINT"SORT Sort File":PRINT"NNAM New Filename":PRINT"RST Restart Database":PRINT"ADD Add New Record"
140 PRINT "TLOD Disk Token Load":PRINT"TOKN Edit Token File":PRINT"MORE More Commands"
150 LOCATE 17,1:PRINT "For Group Functions, append the search command with:":PRINT"\D GROUP DELETE \T GROUP TALLY \W GROUP WRITE(DISK)":PRINT"\S GROUP STATS \P GROUP PRINT \O GROUP SERIAL OUT":PRINT
155 IF Z=1 THEN LOCATE 22,1,1:PRINT "Use of -AND- and - * - is redundant. Please redo...":Z=0
156 IF PEEK(100)=255 THEN GOSUB 7107:PRINT"Too Full to Sort!":POKE 100,0
160 FFLG=0:SOK=0:LOCATE 23,1,1:LINE INPUT"Command? ",X$:GOSUB 7107:IF X$="" OR LEN(X$)>64 THEN 160:ELSE LODIS=1:DFLG=0:TEMP$=""
165 FUNC$="":IF LEFT$(RIGHT$(X$,2),1)="\" THEN FUNC$=CHR$(ASC(RIGHT$(X$,1)) AND 223):X$=LEFT$(X$,LEN(X$)-2)
166 IF Y$=">" THEN X$=">*":Y$=X$
167 IF LEFT$(Y$,1)=">" THEN U$=RIGHT$(X$,LEN(X$)-1)+CHR$(252):GOTO 180
168 IF FFLG=0 AND (LEN(X$)=3 OR LEN(X$)=4) THEN 9000
170 GOSUB 11000:U$=X$+CHR$(252)
180 FOR X=1 TO 7
190 Y=INSTR(U$,TOK$(X)):IF Y=0 THEN NEXT X:ELSE U$=MID$(U$,1,Y-1)+CHR$(NUM(X))+MID$(U$,Y+LEN(TOK$(X))):GOTO 190
200 J=0:TOT=0:GOSUB 7120:GOSUB 7300:IF Z=1 AND Y$<>X$ THEN 100:ELSE IF Z=1 THEN 320
235 RNO=0
240 IF LEFT$(Y$,1)<>">" THEN POKE 16,PEEK(0):POKE 17,PEEK(1):POKE 18,19:POKE 19,0:POKE 32,FNB(P(DBLK)-19):POKE 33,FNC(P(DBLK)-19):POKE 34,PEEK(32):POKE 35,PEEK(33):POKE F,7:CALL G:B=0
2000 PRINT "ENTER/Search More N/New (Main Menu) R/Restart Search D/Delete Record E/Edit Record A/Add New Record C/Copy Record M/More Commands":RETURN
2040 PRINT">/Midsearch Prefix P(#)/Print Record O/Out to RS232 S/Status Display W/Write to Textfile M/More Commands Z/Serial EOF B/Back Step":RETURN
2050 PRINT"You may also enter a new Search Command, or any of the other Main Menu functionsEx: RST, CHAT, NNAM, SAVE, LOAD, MERG, DEFO, BAUD, SORT, etc. M/More Commands":RETURN
3500 'Routine to merge data with ASCII document (Mail Merge)
3510 GOSUB 20200:PRINT:PRINT"This procedure will add FINDEX data to a word processed ASCII document.":PRINT"Results of the merging are printed out in a FORM letter."
3512 FDR$=CHR$(ASC("A")+(2*(HARD AND ENGAGED)))+":"
3515 ON ERROR GOTO 0:IF Z THEN GOSUB 20200:PRINT:PRINT"The document filename you entered could not be loaded from Drive ";FDR$;". Try again.":Z=0
3520 PRINT:PRINT"Enter the name of the document file using standard XXXXXXXX.YYY format, or type: D to produce a Directory of drive ";FDR$:PRINT TAB(8)"JUST ENTER TO RETURN TO THE FINDEX MAIN MENU"
3530 PRINT:LINE INPUT "Selection? ";FM$:IF FM$="" THEN GOTO 100
3540 IF FM$="D" OR FM$="d" THEN GOSUB 20200:FILES FDR$+"*.*":GOTO 3520
3545 B=0:WFLG=0:LOCATE 20,1,0:PRINT STRING$(23,205);" Press <Q> to Return to Main Menu ";STRING$(23,205);
3550 ON ERROR GOTO 3950:OPEN "I",#3,FDR$+FM$:ON ERROR GOTO 3990
3560 IF EOF(3) THEN CLOSE#3:LPRINT:ON 1-(B=0) GOTO 100,3550
3570 LINE INPUT#3,K$
3575 XA=1:OXA=1:RT$=K$:GOSUB 7107:PRINT K$
3580 KB$=INKEY$:IF KB$="Q" OR KB$="q" THEN CLOSE#3:FFLG=0:LPRINT:GOTO 100
3582 XA=INSTR(XA,K$,"["):IF XA=0 THEN 3900
3585 ON ERROR GOTO 3710:YA=INSTR(XA,K$,"]"):LF$=MID$(K$,OXA,XA-OXA):CMD$=MID$(K$,XA,YA-XA+1):RT$=RIGHT$(K$,LEN(K$)-YA):OXA=YA+1:XA=YA:ON ERROR GOTO 3990
3586 IF WFLG=0 THEN LPRINT LF$;
3590 IF CMD$="[XON]" OR CMD$="[xon]" THEN WFLG=0:GOTO 3580
3595 IF CMD$="[XOFF]" OR CMD$="[xoff]" THEN WFLG=1:GOTO 3580
3600 IF (LEFT$(CMD$,3)="[S:" OR LEFT$(CMD$,3)="[s:") AND WFLG=0 THEN X$=MID$(CMD$,4,LEN(CMD$)-4):FFLG=1:SOK=1:GOSUB 166:GOTO 3580
3602 IF LEFT$(CMD$,3)="[S:" OR LEFT$(CMD$,3)="[s:" THEN 3580
3605 IF CMD$="[N]" OR CMD$="[n]" THEN Y$="":FFLG=1:IF B=0 AND SOK THEN GOSUB 600:GOTO 3580:ELSE GOSUB 3000:GOTO 3580
3610 IF (CMD$="[B]" OR CMD$="[b]") AND SOK THEN Y$="B":FFLG=1:GOSUB 600:GOTO 3580
3615 IF LEFT$(CMD$,3)="[L:" OR LEFT$(CMD$,3)="[l:" THEN X=VAL(RIGHT$(CMD$,LEN(CMD$)-3)):GOTO 3850
3620 CD=ASC(RIGHT$(CMD$,LEN(CMD$)-1)):IF CD>47 AND CD<58 THEN CD=VAL(RIGHT$(CMD$,LEN(CMD$)-1)):IF CD<256 AND WFLG=0 THEN LPRINT CHR$(CD);:GOTO 3580:ELSE GOTO 3580
3625 IF (CMD$="[C]" OR CMD$="[c]") AND WFLG=0 THEN LPRINT J;:GOTO 3580
3630 IF (CMD$="[T]" OR CMD$="[t]") AND WFLG=0 THEN LPRINT TOT;:GOTO 3580
3635 IF (CMD$="[D]" OR CMD$="[d]") AND WFLG=0 THEN LPRINT DATE$:GOTO 3580
3640 IF (CMD$="[I]" OR CMD$="[i]") AND WFLG=0 THEN GOSUB 7107:LINE INPUT "Enter text:";LNX$:GOSUB 7107:PRINT Y$:LPRINT LNX$;:GOTO 3580
3645 IF (CMD$="[R]" OR CMD$="[r]") AND B=0 THEN IF WFLG=0 THEN LPRINT:GOTO 3575:ELSE GOTO 3575
3700 GOTO 3900
3710 LF$="":CMD$="":RT$="":RESUME 3900
3850 IF X>0 AND X<20 THEN GOSUB 3997:IF WFLG=0 THEN LPRINT LNX$;:GOTO 3580
3900 IF WFLG=0 THEN LPRINT RT$
3910 GOTO 3560
3950 Z=1:RESUME 3515
3990 GOSUB 7107:PRINT "Printer ERROR!!!":LINE INPUT "ENTER: P to resume printing or any other key to return to Main Menu/";KB$:GOSUB 7107:IF KB$="P" OR KB$="p" THEN PRINT K$:RESUME:ELSE CLOSE#3:FFLAG=0:RESUME 100
4300 ON ERROR GOTO 4991:IF X=0 THEN LPRINT:RETURN:ELSE LPRINT LNX$:RETURN
4310 ON ERROR GOTO 4992:IF X=0 THEN PRINT #2:RETURN:ELSE PRINT#2,LNX$:RETURN
4320 IF X=0 THEN LNX$=""
4325 LNX$=LNX$+CHR$(13)
4330 ON ERROR GOTO 4990:FOR I=1 TO LEN(LNX$):ON RATE GOSUB 8280,8281,8282,8283,8284,8285
4350 PRINT #1,MID$(LNX$,I,1);:CLOSE#1:NEXT I
4360 ON ERROR GOTO 0:RETURN
4370 STOP
4990 RESUME
4991 GOSUB 7107:PRINT "Printer ERROR!!!":LINE INPUT "Enter: P to resume printing or any other key to return to Main Menu/";K$:IF K$="P" OR K$="p" THEN RESUME 4300:ELSE RESUME 100
4992 GOSUB 7107:CLOSE:BEEP:PRINT "Disk ERROR!!! Write Canceled. Press any key to return to Main Menu/":WHILE INKEY$="":WEND:RESUME 100
5000 '
5010 CLS:FOR X=1 TO 19:E$(X)=STRING$(80," "):NEXT X
5020 I(1)=7:I(2)=0:GOSUB 20130:LOCATE 1,1,1
5030 K$=INKEY$:IF K$="" THEN GOTO 5030
5035 OC=POS(0):IF ASC(K$)<32 THEN GOTO 5500:ELSE IF ASC(K$)=127 THEN 5740
5040 IF I(1)=7 THEN MID$(E$(CSRLIN),POS(0),LEN(K$))=K$:PRINT K$;:GOTO 5050
7310 Z=INSTR(X,U$,CHR$(253)):IF Z=0 THEN Z=LEN(U$)
7320 L=INSTR(X,U$,CHR$(1)):C=INSTR(X,U$,CHR$(255)):IF L<Z AND C<Z AND L<>0 AND C<>0 THEN Z=1:RETURN
7330 IF Z<LEN(U$) THEN X=Z+1:GOTO 7310:ELSE Z=0:RETURN
7400 ' *** DEFO Command Processor ***
7410 D=0:IF X$<>Y$ THEN POKE 105,16:GOSUB 7110
7420 GOSUB 9110
7425 FOR X=1 TO 6:LOCATE X+8,41:PRINT X;"-";LEFT$(FOP$(X),10):NEXT X:FOR X=7 TO 12:LOCATE X+2,61:PRINT X;"-";LEFT$(FOP$(X),10):NEXT X:COLOR 3,0
7426 GOSUB 7107:LOCATE 22,1,1:PRINT"Select format number, type CREATE, or press just ENTER to escape this procedure"
7427 G$=L$:IF D<>0 THEN GOTO 7450
7430 LINE INPUT L$:IF L$="create" OR L$="CREATE" THEN GOTO 7700:ELSE IF L$="" THEN L$=G$:GOTO 7450:ELSE GOSUB 7600
7435 IF Z=0 THEN GOSUB 7107:PRINT"Numbers 1-12 only. Or type -CREATE-":GOTO 7430:ELSE X=VAL(L$)
7440 IF LEFT$(FOP$(X),10)="Not Used " THEN GOTO 7650
7445 LET L$=LEFT$(FOP$(X),10):LET LX$=RIGHT$(FOP$(X),LEN(FOP$(X))-10)
7450 GOSUB 7107:Z=0:IF X$=Y$ THEN X$=TEMP$:GOSUB 2000:GOTO 646:ELSE GOTO 100
7600 IF L$="1" OR L$="2" OR L$="3" OR L$="4" OR L$="5" OR L$="6" OR L$="7" OR L$="8" OR L$="9" OR L$="10" OR L$="11" OR L$="12" THEN LET Z=1:ELSE Z=0
7605 IF Z=1 OR T$="DEFO" THEN RETURN
7610 IF L$="13" OR L$="14" OR L$="15" OR L$="16" OR L$="17" OR L$="18" OR L$="19" THEN Z=1:ELSE Z=0
7615 RETURN
7650 LOCATE 22,1,1:GOSUB 7107:PRINT"Format must first be CREATED. Please type -CREATE-":GOTO 7430
7700 POKE 105,21:GOSUB 7110:LOCATE 22,1:LINE INPUT "Select # to DEFINE (1-12)";L$:IF L$="" THEN L$=G$:GOTO 7450:ELSE GOSUB 7600:IF Z=0 THEN GOTO 7700:ELSE X=VAL(L$)
7704 GOSUB 7107:LINE INPUT "Enter format NAME (10 characters max.)";L$:IF L$="" THEN LET L$="Format"+STR$(X):ELSE IF LEN(L$)>10 THEN 7704
7705 GOSUB 7107
7707 IF Z=0 THEN PRINT"Input Error! Try again... ";
7710 LINE INPUT "Type line numbers in sequence of output. Separate with slash. Use 0 to signify blank lines (EX: 1/2/3/0/1 etc.)";LX$
7715 LX$=LX$+"/"
7720 IF ASC(LX$)=47 THEN GOTO 7705:ELSE A$=""
7730 FOR N=1 TO LEN(LX$):D=ASC(MID$(LX$,N,1)):IF D<47 OR D>57 THEN GOTO 7705:ELSE NEXT N:D=1
7735 IF INSTR(LX$,"//")<>0 THEN Z=0:GOTO 7705
7740 N=VAL(MID$(LX$,D,LEN(LX$)-D)):A$=A$+CHR$(N):IF N>19 THEN Z=0:GOTO 7705
7750 D=1+INSTR(D,LX$,"/"):IF D>=LEN(LX$) THEN 7775:ELSE GOTO 7740
7775 L$=L$+" ":L$=LEFT$(L$,10):FOR D=1 TO LEN(A$):MID$(A$,D,1)=CHR$(128+ASC(MID$(A$,D,1))):NEXT D
7780 LET FOP$(X)=L$+A$:OPEN "O",#1,"FORMAT.BAS":FOR N=1 TO 12:PRINT#1,FOP$(N):NEXT N: CLOSE#1:GOTO 7445
7800 K$=X$:' *** TOKN Command Processor ***
7801 GOSUB 9110:LOCATE 8,41:PRINT "Current Tokens:";TKN$:FOR X=1 TO 7:LOCATE 8+X,41:PRINT CHR$(64+X);"/";M$(X):NEXT:COLOR 3,0:GOSUB 7107:LINE INPUT"Enter letter of token to define (A-G), X to NAME file or ENTER to finish:";X$:IF X$="" THEN 7803
7802 GOSUB 9585:IF T$="X" THEN T$="TOKEN":GOSUB 7820:GOTO 7801:ELSE IF T$<"A" OR T$>"G" THEN 7801:ELSE PRINT"Now enter text (32 Chars. MAX) for token/";T$;":";:LINE INPUT MX$:M$(ASC(T$)-64)=LEFT$(MX$,32):GOTO 7801
7803 IF TKN$="" THEN TKN$="NoName":GOTO 7803:ELSE OPEN"O",#1,TKN$+".tkn":FOR X=1 TO 7:PRINT#1,M$(X):NEXT:CLOSE#1
7804 X$=K$:GOTO 9230
7810 K$=X$:X$="A:":ON ERROR GOTO 7815
7811 LINE INPUT"Enter token filename:";T$:GOSUB 7107:IF T$="" THEN 7804
7812 OPEN"I",#1,X$+T$+".tkn":FOR X=1 TO 7:INPUT#1,M$(X):NEXT:CLOSE#1:TKN$=T$:ON ERROR GOTO 0:GOTO 7804
7815 IF X$="A:" THEN X$="B:":RESUME
7816 PRINT "Disk Error or File Not Found":X$=K$:RESUME 7810
7820 GOSUB 9210:IF G$="" THEN RETURN:ELSE SWAP F$,G$:TKN$=G$:RETURN
7900 '
7901 OPEN "o",#1,"FORMAT.BAS":FOR X=1 TO 12:PRINT#1;"Not Used ":NEXT X:CLOSE #1:RESUME
8000 GOSUB 7107:Z$=L$:INPUT "lines per record";L$:GOSUB 7600:SWAP L$,Z$:IF Z=0 THEN 8000:ELSE Z=0:A=VAL(Z$)
8005 FOR X=1 TO 19:E$(X)=SPACE$(80):NEXT X:IF X$="SERI" THEN PRINT"Serial input. Stand by...":SFLG=1:GOTO 8022
8007 DR$="A:":IF HARD AND ENGAGED THEN DR$="C:"
8010 LET Q$=F$:GOSUB 9212:SWAP F$,Q$:PRINT "Merging. Stand by...":OP1=P(1):OP2=P(2):CLOSE
8020 ON ERROR GOTO 8200:OPEN "i",#1,DR$+Q$+".TXT":ON ERROR GOTO 0
8022 Z$=""
8025 X=1:N=X:FOR L=1 TO A
8026 IF X$="SERI" THEN ON SFLG GOTO 8242,8250
8030 IF EOF(1) AND Z$="" THEN CLOSE#1:X$="":FOR X=L TO A:E$(X)=SPACE$(80):NEXT X:GOTO 8070
8040 ON ERROR GOTO 8100:IF Z$="" THEN LINE INPUT#1,Y$:ELSE Y$=Z$:Z$=""
8042 IF LEN(Y$)>80 THEN Z$=RIGHT$(Y$,LEN(Y$)-80):Y$=LEFT$(Y$,80):GOTO 8050
8050 E$(X)=Y$+SPACE$(80-LEN(Y$)):X=X+1:IF X>A THEN 8070
8060 NEXT L
8070 GOTO 5631
8080 GOTO 8025
8100 GOSUB 7107:PRINT"Disk READ Error... Data input canceled. Press any key to return to Menu.":BEEP:P(1)=OP1:P(2)=OP2:CLOSE#1:DEF SEG=DS:POKE P(1),128:DEF SEG=DS2:POKE P(2),128:DEF SEG=MC
8110 WHILE INKEY$="":WEND:RESUME 100
8200 IF DR$="A:" THEN DR$="B:":RESUME
8220 PRINT Q$;" file is not on disk.":INPUT "Options: DISK for Disk Index, ENTER for Menu, or new FILENAME";X$:CLOSE #1:IF X$="" THEN X$="MERG":RESUME 9230:ELSE IF X$="DISK" OR X$="disk" THEN RESUME 9000
8245 ON ERROR GOTO 8260:ON RATE GOSUB 8280,8281,8282,8283,8284,8285
8246 ON COM(1) GOSUB 8249:COM(1) ON
8247 WHILE INKEY$="":WEND:COM(1) OFF:ERROR 100
8249 COM(1) OFF:RETURN 8250
8250 LINE INPUT#1,Y$:IF Y$=CHR$(26) THEN Y$="":GOTO 8270
8255 ON ERROR GOTO 0:SFLG=2:GOTO 8042
8260 IF INKEY$<>"" OR ERR=100 THEN Y$="":RESUME 8270:ELSE RESUME
8270 ON ERROR GOTO 0:CLOSE#1
8275 E$(L)=Y$+SPACE$(80-LEN(Y$)):FOR X=L+1 TO A:E$(X)=SPACE$(80):NEXT X:X$="":X=1:GOTO 8070
8280 OPEN "COM1:300,N,8,1" AS #1:RETURN
8281 OPEN "COM1:600,N,8,1" AS #1:RETURN
8282 OPEN "COM1:1200,N,8,1" AS #1:RETURN
8283 OPEN "COM1:2400,N,8,1" AS #1:RETURN
8284 OPEN "COM1:4800,N,8,1" AS #1:RETURN
8285 OPEN "COM1:9600,N,8,1" AS #1:RETURN
8300 LINE INPUT "Enter Desired Baud Rate:";T$:IF T$="" THEN 7450:ELSE IF T$="300" OR T$="600" OR T$="1200" OR T$="2400" OR T$="4800" OR T$="9600" THEN 8310:ELSE GOSUB 7107:GOTO 8300
8310 R=VAL(T$):R2=300:FOR RATE=1 TO 6:IF R<>R2 THEN R2=2*R2:NEXT RATE
9035 IF T$="ASCI" THEN GOSUB 7107:LOCATE 24,1:INPUT;"Enter NAME for WRITE file";G$:IF G$="" THEN 9230:ELSE GOSUB 7107:GOSUB 9213:IF G$="" THEN 9230:ELSE SWAP F$,G$:FX$=G$:CLOSE:GOTO 9190
9040 IF T$="LOAD" THEN 9400
9045 IF T$="SORT" THEN 9700
9050 IF T$="DEFO" THEN 7400
9055 IF T$="CHAT" THEN SWAP G$,L$:LINE INPUT "Enter line number which holds the number to tally:";L$:GOSUB 7600:SWAP G$,L$:IF G$="" THEN 7450:ELSE IF Z=0 THEN GOTO 9000:ELSE T=VAL(G$):Z=0:G$=X$:GOTO 7450
9060 IF T$="MERG" OR T$="SERI" THEN X$=T$:GOTO 8000
9065 IF T$="BAUD" THEN G$=X$:GOTO 8300
9070 IF T$="TOKN" THEN 7800
9075 IF T$="EXIT" THEN BEEP:LINE INPUT "EXIT to DOS... Are you sure (Y/N)";X$:IF X$="Y" OR X$="y" THEN SYSTEM:ELSE GOTO 100
9080 IF T$="TLOD" THEN 7810
9085 IF T$="FORM" THEN 3500
9090 IF T$="SDAT" THEN GOSUB 7107:ON ERROR GOTO 9101:LINE INPUT "Enter Date (MM/DD/YY)";G$:DATE$=G$:ON ERROR GOTO 0:G$=X$:GOTO 7450
9095 IF T$="HARD" THEN ENGAGED=ABS(ENGAGED-1):GOTO 9230
9330 ON ERROR GOTO 9395:POKE F,8:CALL G:ON ERROR GOTO 0:IF PEEK(&H2A)<>0 THEN GOTO 9350
9340 G$=X$:GOSUB 10100:X$=G$:GOTO 9230
9350 IF PEEK(&H2A)<>0 AND PEEK(44)=1 THEN KILL "A:"+F$+".fdx":POKE 44,2:GOTO 9330
9380 GOSUB 7107:IF PEEK(&H2A)=1 THEN PRINT"Not enough room on disk.":KILL "B:"+F$+".FDX"
9390 PRINT "Warning! Disk Write Error... Save data again on another disk.":PRINT "Press any key to resume Main Menu":WHILE INKEY$="":WEND:Y$="N":X$="*":K$="x":GOTO 9340
9395 GOSUB 7107:PRINT "Disk not ready. Insert Disk, close door, press any key...":WHILE INKEY$="":WEND:RESUME 9330
9400 ' *** Load Routine ***
9405 DR=1:Q$=F$:GOSUB 9212:IF G$="" THEN 9230
9410 SWAP F$,G$:IF HARD AND ENGAGED THEN DR=3:POKE 44,DR
9420 ON ERROR GOTO 9490:POKE F,9:CALL G:ON ERROR GOTO 0
9435 IF PEEK(&H2A)<>0 AND DR=1 THEN DR=2:GOSUB 9221:GOTO 9420
9440 IF PEEK(&H2A)<>0 AND (DR=2 OR DR=3) THEN DR=1:LOCATE 22,1,0:PRINT "File not found.":F$=Q$:GOSUB 9220:GOTO 9405
9450 F$="":DEF SEG=DS:LET P(1)=FNA(0):P(2)=FNA(2):FOR X=1 TO 8:LET F$=F$+CHR$(PEEK(3+X)):IF PEEK(3+X)<>32 THEN NEXT X:F$=F$+" "
9490 GOSUB 7107:PRINT "Disk not ready. Insert Disk, close door, press any key...":WHILE INKEY$="":WEND:RESUME 9420
9500 '
9510 CLS:GOSUB 20200:PRINT "Disk Directory... .FDX files are accessed with SAVE/LOAD commands .TXT files are accessed with WRITE and MERGE .TKN files are accessed with TLOD"
9530 LOCATE 22,1:PRINT"Current File:";F$,"Current ASCII Output File:";FX$:PRINT "Options: SAVE/LOAD/MERG/TLOD/NNAM/ASCI/DELE/RENM/HARD or <ENTER> for Main Menu":K$="DISK":INPUT;X$:GOSUB 9585:X$=T$:POKE 105,20:GOSUB 7110
9539 IF X$="NNAM" OR X$="SAVE" OR X$="LOAD" OR X$="MERG" OR X$="ASCI" OR X$="TLOD" OR X$="HARD" THEN RETURN
9540 IF X$="" THEN K$=X$:RETURN 100
9542 IF X$="DELE" OR X$="RENM" THEN GOSUB 7107:PRINT"Enter FILENAME to ";X$;" using standard XXXXXXXX.YYY format":INPUT Q$:IF Q$="" THEN 9550:ELSE 9560
9550 GOTO 9530
9560 IF X$="DELE" THEN 9610:ELSE INPUT"Now enter NEW name:";T$:GOTO 9600
9585 T$=X$:FOR X=1 TO LEN(X$):N=ASC(MID$(X$,X,1)) AND 223:MID$(T$,X,1)=CHR$(N):NEXT:RETURN
9590 IF X$="A:" AND ERR=53 THEN X$="B:":RESUME 9605
9591 LOCATE 21,1:PRINT"Can't rename (";Q$;") as (";T$;") because ";
9592 IF ERR=58 THEN PRINT T$;" already exists."
9593 IF ERR=55 THEN PRINT T$;" is currently in use."
9594 IF X$="B:" AND ERR=53 THEN PRINT Q$;" is not on disk."
9595 RESUME 9524
9599 RESUME NEXT
9600 GOSUB 7107:X$="A:":IF HARD AND ENGAGED THEN X$="C:"
9605 ON ERROR GOTO 9590:NAME X$+Q$ AS X$+T$:ON ERROR GOTO 0:GOTO 9500
9610 IF Q$=FX$+".TXT" OR Q$=FX$+".txt" THEN CLOSE:FX$=""
9615 IF HARD AND ENGAGED THEN ON ERROR GOTO 9599:KILL "C:"+Q$:ON ERROR GOTO 0:GOTO 9500
9618 ON ERROR GOTO 9599:KILL "A:"+Q$:KILL "B:"+Q$:ON ERROR GOTO 0
9620 GOTO 9500
9700 GOSUB 11000:G$=L$:LINE INPUT "Enter line number you wish to sort by:";L$:IF RIGHT$(L$,1)="-" THEN X=114:L$=LEFT$(L$,LEN(L$)-1):SD$="-":GOTO 9710:ELSE X=119:SD$="+"
9710 GOSUB 7600:IF Z THEN POKE 1594,X:S=VAL(L$):POKE &H53,S:POKE F,7:CALL G:POKE F,11:PRINT"Sorting...":CALL G:L$=G$:Z=0:P(1)=FNA(92):P(2)=FNA(88):GOTO 100:ELSE L$=G$:GOTO 9000
9900 IF Y$=X$ THEN LET X$=TEMP$:Y$="M":GOSUB 7100:GOTO 505
9902 LOCATE 8,1:FOR X=1 TO 7:PRINT STRING$(28,32):NEXT X:LOCATE 8,1
9905 IF M=2 THEN M=0:GOTO 130:ELSE IF M=1 THEN 9930
9910 PRINT "MERG to Merge Data":PRINT"CHAT Change Tally Line":PRINT"BAUD Set Ser. Baud Rate":PRINT"ASCI Name ASCII Output File":PRINT"DISK Disk Utilities":PRINT"SDAT Set Date":PRINT"SERI Merge Serial Records"
9920 M=1:GOTO 160
9930 PRINT "SAVE to Save File":PRINT "LOAD to Load File":PRINT "EXIT Returns to DOS":PRINT "FORM to Print Form Letters":PRINT "HARD Select HARD/FLOPPY Disk"
10087 PRINT:PRINT"This shareware copy comes to you compliments of:":GOSUB 62100:PRINT "Press any key to begin...":WHILE INKEY$="":WEND
10100 X$="SEARCH IS COMPLETE":FOR X=1 TO 18:Y=ASC(MID$(X$,X,1)):DEF SEG=DS:POKE X,Y:DEF SEG=DS2:POKE X,Y:NEXT X:POKE 0,1:POKE 19,1:DEF SEG=DS:POKE 0,1:POKE 19,1:DEF SEG=MC:RETURN
10110 OPEN "O",#1,"FORMAT.BAS":X$="":FOR X=1 TO 19:X$=X$+CHR$(128+X):NEXT X:PRINT#1,"ALL LINES "+X$:FOR X=2 TO 12:PRINT#1,"Not Used ":NEXT X:CLOSE#1:RESUME
10111 '
10120 GOSUB 11050:FOR X=86 TO 89:POKE X,PEEK(X-86):NEXT X:GOSUB 11000:FOR X=90 TO 93:POKE X,PEEK(X-90):NEXT X:RETURN
10130 ' *** Test for Hard Disk ***
10135 ON ERROR GOTO 10150:OPEN "I",#1,"C:test.bin":CLOSE#1
10136 HARD=1
10137 ON ERROR GOTO 0:RETURN
10140 HARD=0:GOTO 10137
10150 IF ERR=76 THEN RESUME 10140:ELSE RESUME 10136
20150 PRINT" F4 Line Delete"," F7 Line Erase"," F2 Line Insert"," F5 Close Record"," F8 Next Record";" F3 Lprint Record"," F6 Status Display"," F9 More...":RETURN
20170 Y=1:PRINT "ESC Escape ADD/EDIT mode F10 Print Date F9 MORE CTRL/Z Swap":FOR X=1 TO 7:PRINT TAB(Y);CHR$(64+X);":";LEFT$(M$(X),10);:Y=Y+17
20180 IF Y>68 THEN PRINT:Y=1
20190 NEXT X:PRINT TAB(Y);"CTRL Keys (A-G) Print Tokens":RETURN
20200 CLS
20201 PRINT STRING$(80,205);SPC(15);"FINDEX INFORMATION STORAGE AND RETRIEVAL SYSTEM":PRINT STRING$(80,205);:RETURN
49995 DATA " and ",255," AND ",255," or ",253," OR ",253," not ",254," NOT ",254,"*",1
60000 POKE F,10:CALL G:PRINT FNA(81):RETURN
62000 ' *** Subroutine to determine segments for machine code and data ***
62005 LET MCD$=CHR$(&H2E)+CHR$(&H8C)+CHR$(&HE)+CHR$(&H0)+CHR$(&H0)+CHR$(&HCB)+CHR$(&H0)+CHR$(&H0)